package com.markerhub.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.markerhub.entity.SysTime;
import com.markerhub.mapper.SysTimeMapper;
import com.markerhub.service.SysTimeService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author wang
 * @since 2022-03-31
 */
@Service
public class SysTimeServiceImpl extends ServiceImpl<SysTimeMapper, SysTime> implements SysTimeService {

    @Override
    public List<SysTime> getByTimesSpan(SysTime sysTime) {
        return this.list(new QueryWrapper<SysTime>().inSql("timespan", String.valueOf(sysTime.getTimespan())));
    }


}
